#include<stdio.h>
main()
{
    long a,i,n;
    int term=0,sum=0;
    printf("Input a,n:");
    scanf("%d,%d",&a,&n);
    for(i=1;i<=n;i++)
    {
        term=term*10+a;
        sum+=term;
    }
    printf("sum=%ld\n",sum);
}
